package com.ruoyi.system.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 隔离人员
 * @TableName gl_people
 */
@TableName(value ="gl_people")
@Data
public class GlPeople implements Serializable {
    /**
     *
     */
    @Excel(name = "用户序号", prompt = "用户编号")
    @TableId(type = IdType.AUTO)
    private Long userId;

    /**
     * 隔离状态1 表示隔离中 2表示解除隔离
     */
    @Excel(name = "隔离状态", prompt = "隔离状态")
    private Integer status;


    /**
     * 头像
     */
    @Excel(name = "头像", prompt = "头像")
    private String avatarUrl;

    /**
     * 隔离人员名称
     */
    @Excel(name = "隔离人员名称", prompt = "隔离人员名称")
    private String userName;

    /**
     * 性别
     */
    @Excel(name = "性别", prompt = "性别")
    private String gender;

    /**
     * 年龄
     */
    @Excel(name = "年龄", prompt = "年龄")
    private Integer age;

    /**
     * 邮箱
     */
    @Excel(name = "邮箱", prompt = "邮箱")
    private String email;

    /**
     * 手机号码
     */
    @Excel(name = "手机号码", prompt = "手机号码")
    private String phoneNumber;

    /**
     * 证件类型，如身份证、护照等
     */
    @Excel(name = "证件类型", prompt = "证件类型")
    private Integer idType;

    /**
     * 证件照片
     */
    @Excel(name = "证件照片", prompt = "证件照片")
    private String idPhoto;

    /**
     * 证件号码
     */
    @Excel(name = "证件号码", prompt = "证件号码")
    private String idNumber;

    /**
     * 地址
     */
    @Excel(name = "地址", prompt = "地址")
    private String address;

    /**
     * 健康情况
     */
    @Excel(name = "健康情况", prompt = "健康情况")
    private Integer healthStatus;

    /**
     * 创建时间
     */
    @Excel(name = "创建时间", prompt = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT)//创建与修改时自动填充
    private Date createTime;

    /**
     * 更新新时间
     */
    @Excel(name = "更新新时间", prompt = "更新新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)//创建与修改时自动填充
    private Date updateTime;

    /**
     * 逻辑删除1删除0正常
     */
    private Integer isDelete;

    /**
     * 用户唯一标识，外键，与IsolationInfo表的IsolationID关联
     */
    private Long isolationId;

    /**
     * 开始隔离时间
     */
    @Excel(name = "开始隔离时间", prompt = "开始隔离时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date beginTime;

    /**
     * 结束隔离时间
     */
    @Excel(name = "结束隔离时间", prompt = "结束隔离时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    /**
     * 登录密码
     */
    private String password;


    @Excel(name = "隔离点名称", prompt = "隔离点名称")
    @TableField(exist = false)
    private String isolationName;

    @Excel(name = "隔离点类型", prompt = "隔离点类型")
    @TableField(exist = false)
    private String facilityType;

    @Excel(name = "隔离点经度", prompt = "隔离点经度")
    @TableField(exist = false)
    private String isolationLongitude;

    @Excel(name = "隔离点纬度", prompt = "隔离点纬度")
    @TableField(exist = false)
    private String isolatedLatitude;

    @Excel(name = "隔离点地址", prompt = "隔离点地址")
    @TableField(exist = false)
    private String isolationAddress;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        GlPeople other = (GlPeople) that;
        return (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getAvatarUrl() == null ? other.getAvatarUrl() == null : this.getAvatarUrl().equals(other.getAvatarUrl()))
            && (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName()))
            && (this.getGender() == null ? other.getGender() == null : this.getGender().equals(other.getGender()))
            && (this.getAge() == null ? other.getAge() == null : this.getAge().equals(other.getAge()))
            && (this.getEmail() == null ? other.getEmail() == null : this.getEmail().equals(other.getEmail()))
            && (this.getPhoneNumber() == null ? other.getPhoneNumber() == null : this.getPhoneNumber().equals(other.getPhoneNumber()))
            && (this.getIdType() == null ? other.getIdType() == null : this.getIdType().equals(other.getIdType()))
            && (this.getIdPhoto() == null ? other.getIdPhoto() == null : this.getIdPhoto().equals(other.getIdPhoto()))
            && (this.getIdNumber() == null ? other.getIdNumber() == null : this.getIdNumber().equals(other.getIdNumber()))
            && (this.getAddress() == null ? other.getAddress() == null : this.getAddress().equals(other.getAddress()))
            && (this.getHealthStatus() == null ? other.getHealthStatus() == null : this.getHealthStatus().equals(other.getHealthStatus()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getIsDelete() == null ? other.getIsDelete() == null : this.getIsDelete().equals(other.getIsDelete()))
            && (this.getIsolationId() == null ? other.getIsolationId() == null : this.getIsolationId().equals(other.getIsolationId()))
            && (this.getBeginTime() == null ? other.getBeginTime() == null : this.getBeginTime().equals(other.getBeginTime()))
            && (this.getEndTime() == null ? other.getEndTime() == null : this.getEndTime().equals(other.getEndTime()))
            && (this.getPassword() == null ? other.getPassword() == null : this.getPassword().equals(other.getPassword()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getAvatarUrl() == null) ? 0 : getAvatarUrl().hashCode());
        result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode());
        result = prime * result + ((getGender() == null) ? 0 : getGender().hashCode());
        result = prime * result + ((getAge() == null) ? 0 : getAge().hashCode());
        result = prime * result + ((getEmail() == null) ? 0 : getEmail().hashCode());
        result = prime * result + ((getPhoneNumber() == null) ? 0 : getPhoneNumber().hashCode());
        result = prime * result + ((getIdType() == null) ? 0 : getIdType().hashCode());
        result = prime * result + ((getIdPhoto() == null) ? 0 : getIdPhoto().hashCode());
        result = prime * result + ((getIdNumber() == null) ? 0 : getIdNumber().hashCode());
        result = prime * result + ((getAddress() == null) ? 0 : getAddress().hashCode());
        result = prime * result + ((getHealthStatus() == null) ? 0 : getHealthStatus().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getIsDelete() == null) ? 0 : getIsDelete().hashCode());
        result = prime * result + ((getIsolationId() == null) ? 0 : getIsolationId().hashCode());
        result = prime * result + ((getBeginTime() == null) ? 0 : getBeginTime().hashCode());
        result = prime * result + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
        result = prime * result + ((getPassword() == null) ? 0 : getPassword().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", userId=").append(userId);
        sb.append(", avatarUrl=").append(avatarUrl);
        sb.append(", userName=").append(userName);
        sb.append(", gender=").append(gender);
        sb.append(", age=").append(age);
        sb.append(", email=").append(email);
        sb.append(", phoneNumber=").append(phoneNumber);
        sb.append(", idType=").append(idType);
        sb.append(", idPhoto=").append(idPhoto);
        sb.append(", idNumber=").append(idNumber);
        sb.append(", address=").append(address);
        sb.append(", healthStatus=").append(healthStatus);
        sb.append(", createTime=").append(createTime);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", isDelete=").append(isDelete);
        sb.append(", isolationId=").append(isolationId);
        sb.append(", beginTime=").append(beginTime);
        sb.append(", endTime=").append(endTime);
        sb.append(", password=").append(password);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
